Learn R Programming

GISTools (version 1.0-2)

Polygon Areas: Area of Each Polygon

Description

Given a set of polygons, returns the area of each polygon.

Usage

poly.areas(polys)

Value

A list of areas of the same length as the number of polygons in polys.

Arguments

polys

A SpatialPolygons or SpatialPolygonsDataFrame or sf -POLYGON or - MULTIPOLYGON object.

Author

Chris Brunsdon, Binbin Lu

Examples

Run this code
# Data for New Haven to use in example
data(newhaven)
# What is the area each census block?
poly.areas(blocks)

Run the code above in your browser using DataLab